package com.zrh.jserver;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("config")
@RefreshScope // 必须
public class ConfigController {

    @Value("${dev.server}")
    private String mc;

    @RequestMapping(value = "/get")
    public String get() {
        System.out.println("1222222222222"+mc);
        return mc;
    }
}